package com.ccs;



import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.AdapterView.OnItemSelectedListener;
public class mcTest3  extends Activity implements OnClickListener {
	

	public String quest;
	public String mc1;
	public String mc2;
	public String mc3;
	public String mc4;
	public TextView question;
	public RadioButton mcChoice1;
	public RadioButton mcChoice2;
	public RadioButton mcChoice3;
	public RadioButton mcChoice4;
	public Button btnNext;
	public Button btnPrev;
	public void inTest()
	{
		quest= "question3";
         mc1="ans"; 
         mc2="ans";
         mc3="ans"; 
         mc4="ans";
		
		/*multChoice mc= new multChoice();
		mcQuestions=mc.getQuestions();
		mcChoices=mc.getChoices();
        */	
		//getResources().getString(R.string.quest1);
	}

	
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        inTest();
        setContentView(R.layout.mcform);
        putComp();
        
        //Thread trload= new Thread(new loading(this));
        //trload.start();
        
      
        
    	
    }
	public void putComp()
	{
		question=(TextView)findViewById(R.id.MCQuestion);
		question.setText(quest);
		mcChoice1=(RadioButton)findViewById(R.id.mChoice1);
		mcChoice2=(RadioButton)findViewById(R.id.mChoice2);
		mcChoice3=(RadioButton)findViewById(R.id.mChoice3);
		mcChoice4=(RadioButton)findViewById(R.id.mChoice4);
		btnNext=new Button(this);
		btnNext=(Button)findViewById(R.id.mcbtnNext);
		btnPrev=new Button(this);
		btnPrev=(Button)findViewById(R.id.mcbtnPrev);
		
		mcChoice1.setText(mc1);
		mcChoice2.setText(mc2);
		mcChoice3.setText(mc3);
		mcChoice4.setText(mc4);
		btnNext.setText("Next");
		btnNext.setOnClickListener(this);
		btnPrev.setOnClickListener(this);
	}
	public void onClick(View v) {
		if(v==btnNext)
		{
			//finish();
			startActivity(new Intent("com.ccs.tfTest1"));
		}
		if(v==btnPrev)
		{
			finish();
			startActivity(new Intent("com.ccs.mcTest2"));
		}
	}

}